package com.xueyu.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.xueyu.domain.outRecord.outRecordBean;
import com.xueyu.domain.personinfo.personinfoBean;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

public interface outRecordDao extends BaseMapper<outRecordBean> {
    List<personinfoBean> selectPersonifyNameById(int personifyId);

    @Select("selectOutRecordAll")
    List<outRecordBean> selectOutRecordAll(@Param("search") String search, @Param("time") String time, @Param("beginTime") String beginTime, @Param("endTime") String endTime, @Param("offset") int offset, @Param("pageSize") int pageSize);
    int countInTime();
    int countOutTime();

    @Select("selectOutRecordAll2")
    List<outRecordBean> selectOutRecordAll2(@Param("search") String search, @Param("time") String time, @Param("beginTime") String beginTime, @Param("endTime") String endTime, @Param("offset") int offset, @Param("pageSize") int pageSize);


    List<outRecordBean> getIdList(int id);

    @Update("UpdateStateAs2")
    int UpdateStateAs2(@Param("outTime")String outTime, @Param("id")int id);

    int AddOutRecord(outRecordBean outRecordBean);

    List<outRecordBean> selectWhereName(outRecordBean outRecordBean);

}
